package com.android.kotlincoroutinemvvmdemo.dialog
import android.content.Context
import android.util.Log
import com.android.kotlincoroutinemvvmdemo.R
import com.android.kotlincoroutinemvvmdemo.databinding.DialogTestDaynight2Binding
import com.android.kotlincoroutinemvvmdemo.databinding.DialogTestDaynightBinding

class TestDayNightDialog(context: Context) : BaseDialog<DialogTestDaynight2Binding>(context) {

    override fun getLayoutId() = R.layout.dialog_test_daynight2

    override fun adapterUIModeNightForDialog(uiModeNight: Boolean) {
        super.adapterUIModeNightForDialog(uiModeNight)
        if (uiModeNight) {
            mBinding.clDayNight.setBackgroundResource(R.drawable.layout_bg_04)
        } else {
            mBinding.clDayNight.setBackgroundResource(R.drawable.layout_bg_01)
        }
    }

    override fun onStart() {
        super.onStart()
        Log.d(TAG,"onStart")
    }

    override fun onStop() {
        super.onStop()
        Log.d(TAG,"onStop")
    }

    override fun onContentChanged() {
        super.onContentChanged()
        Log.d(TAG, "onContentChanged")
    }

    companion object {
        const val TAG = "TestDayNightDialog"
    }
}